package com.fzy.auth.action;

import java.util.List;

import com.fzy.auth.query.ContactQuery;
import com.fzy.auth.service.ContactService;
import com.opensymphony.xwork.ActionSupport;
import com.opensymphony.xwork.ModelDriven;
import com.opensymphony.xwork.Preparable;

public class ContactListAction extends ActionSupport implements ModelDriven, Preparable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1749240209994548252L;

	List list;
	ContactQuery contactQuery;
    ContactService contactService;

	public String execute() throws Exception {
		list = contactService.list(contactQuery);
		return "dispatcher:/WEB-INF/jsp/auth/contact-list.jsp";
    }

	public void prepare() throws Exception {
		contactQuery = new ContactQuery();
	}

	public void setContactService(ContactService contactService) {
		this.contactService = contactService;
	}

	public Object getModel() {
		return contactQuery;
	}

	public List getList() {
		return list;
	}

	public ContactQuery getContactQuery() {
		return contactQuery;
	}
	
}
